﻿using System;
using System.Linq;

namespace _123筛选能被5整除的整数_LINQ语法
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] 数组 = { 12, 15, 35, 32, 45, 77, 80, 63 };

            var 结果 = from n in 数组
                     where (n % 5) == 0
                     select n;


            Console.WriteLine("能被5整除的元素有：");
            foreach (int x in 结果)
            {
                Console.WriteLine("{0}", x);
            }
        }
    }
}
